﻿@using QDT.Common
@using QDT.Core
@using QDT.Core.Members
@using QDT.MVC.UI
@model QDT.Common.IPagedList<QDT.Core.Members.UserTransLog>

@{
    ViewBag.Title = "充值提现";

    var account = (UserAccount) ViewData["UserAccount"];
    int t = int.Parse(Request.Params["t"] ?? "0");
}
@section Head {
    <script type="text/javascript" src="@Url.Content("~/Content/Default/JS/TweenMax.min.js")"> </script>

}
<div class="ui-body">
<div class="ui-inner">
    <div class="ui-grid-row">

        @Html.Action("UserMenu", new {
                                         route = MenuRoute.ChargeCarry
                                     })

        <div class="ui-grid-20">

            <div class="ui-box">
                <div class="ui-uc-info ui-recharge-user">
                    <div class="balance">
                        <span>账户余额：</span>
                        <span><em>@((account.Money + account.LockMoney).ToMoney())</em></span>
                        <span class="active">
                            <a href="@Url.Action("MoneyIncharge")" class="ui-button ui-button-red big">充值</a>
                            <a href="@Url.Action("MoneyCarry")" class="ui-button ui-button-orange big">提现</a>
                        </span>
                    </div>
                    <div class="ext">
                        <span>冻结金额：</span>
                        <span style="margin-right: 30px;"><em>@account.LockMoney.ToMoney()</em></span>
                        <span>可用金额：</span>
                        <span><em>@account.Money.ToMoney()</em></span>
                    </div>
                </div>
            </div>
                    
            <div class="ui-box">
                        
                <div class="ui-tab">
                    <ul class="ui-tab-items">
                        <li class="ui-tab-item @(t == 0 ? "ui-tab-item-current" : "")">
                            <a href="@Url.Action("Money")">全部</a>
                        </li>
                        <li class="ui-tab-item @(t == 1 ? "ui-tab-item-current" : "")">
                            <a href="@Url.Action("Money","User",new {t=1})">充值</a>
                        </li>
                        <li class="ui-tab-item @(t == 2 ? "ui-tab-item-current" : "")">
                            <a href="@Url.Action("Money","User",new {t=2})">提现</a>
                        </li>
                    </ul>
                </div>

                <div class="ui-table-container">
                    <table class="ui-table ui-table-inbox thead-ext"><!-- 可以在class中加入ui-table-inbox或ui-table-noborder分别适应不同的情况 -->
                        <thead>
                            <tr>
                                <th>时间</th>
                                <th>交易类型<em class="ft-bar">|</em>流水号</th>
                                <th style="width: 230px;">明细</th>
                                <th>对方</th>
                                <th>金额(元)</th>
                                <th>可用余额(元)</th>
                            </tr>
                        </thead><!-- 表头可选 -->
                        <tbody>
                            @foreach(var o in Model){
                                <tr>
                                    <td>
                                        <p>@o.Time.ToShortDateString()</p>
                                        <p>@o.Time.ToShortTimeString()</p>
                                    </td>
                                    <td>
                                        <p>@o.Trade.ToLocalizable()</p>
                                        <p>@o.ID</p>
                                    </td>
                                    <td>@o.Info</td>
                                    <td>@(string.IsNullOrWhiteSpace(o.TradeUser) ? "" :o.TradeUser)</td>
                                    <td style="@(o.Money>0?"color:#27ae60":"color: #f39c12")">@o.Money.ToMoney()</td>
                                    <td>@(o.OverMoney<0 ? "-" : o.OverMoney.ToMoney().ToString())</td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>

                 @Html.ClientPager(Model)
                </div>
            </div>

        </div>
    </div>
</div>